/* ==========================================
   EVOLUTION TIMELINE
========================================== */

.evolution-section {
    width: 100%;
    background: #fff;
    padding: 80px 40px;
    overflow: hidden;
}

.evolution-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1.15fr 0.9fr 1.15fr;

    align-items: stretch;
}


/* ==========================================
   LEFT CONTENT
========================================== */

.evolution-left {
    min-width: 0;
    padding: 10px 70px 0 0;

    display: flex;
    flex-direction: column;
}

.evolution-title {
    margin: 0 0 24px;

    font-size: clamp(32px, 3vw, 52px);
    line-height: 1.04;
    font-weight: 700;

    color: #0b2864;
}

.evolution-title span {
    display: block;
    color: #ff671d;
}

.evolution-intro {
    width: 100%;
    max-width: 480px;

    margin: 0;

    font-size: 14px;
    line-height: 1.65;

    color: #222;
}


/* ==========================================
   TIMELINE NAVIGATION
========================================== */

.timeline-navigation {
    margin-top: auto;
    padding-bottom: 8px;

    display: flex;
    align-items: center;
    gap: 15px;

    min-width: 0;
}

.timeline-years {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 18px;
}

.year-btn {
    position: relative;

    border: 0;
    padding: 12px 0;

    background: transparent;

    font-family: inherit;
    font-size: 12px;
    font-weight: 500;

    color: #c4c4c4;

    cursor: pointer;

    transition:
        color 0.35s ease,
        font-size 0.35s ease,
        transform 0.35s ease;
}

.year-btn:hover {
    color: #0b2864;
}

.year-btn.active {
    font-size: 30px;
    line-height: 1;
    font-weight: 700;

    color: #0b2864;
}

.year-btn.active::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: -11px;

    width: 7px;
    height: 7px;

    background: #ff671d;
    border-radius: 50%;

    transform: translateX(-50%);
}

.timeline-arrow {
    width: 25px;
    height: 25px;

    flex: 0 0 25px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ff671d;
    border-radius: 50%;

    background: transparent;
    color: #ff671d;

    font-size: 9px;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.timeline-arrow:hover {
    background: #ff671d;
    color: #fff;
}

.timeline-dot {
    display: none;
}


/* ==========================================
   IMAGE
========================================== */

.evolution-image-wrapper {
    position: relative;

    width: 100%;
    height: 430px;

    overflow: hidden;

    background: #edf1f7;
}

.evolution-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    opacity: 1;
    transform: scale(1);

    transition:
        opacity 0.35s ease,
        transform 0.55s ease;
}

.evolution-image.is-changing {
    opacity: 0;
    transform: scale(1.04);
}


/* ==========================================
   RIGHT CONTENT
========================================== */

.evolution-right {
    min-width: 0;
    height: 430px;

    padding: 32px 48px 40px;

    background: #fafafa;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.display-year {
    font-size: 15px;
    line-height: 1;
    font-weight: 700;

    color: #0b2864;

    transition: opacity 0.25s ease;
}

.evolution-stat {
    padding-bottom: 15px;
}

.percentage {
    margin: 0 0 12px;

    font-size:18px;
    line-height: 1;
    font-weight: 700;

    color: #0b2864;

    transition:
        opacity 0.25s ease,
        transform 0.3s ease;
}

.stats-description {
    width: 100%;
    max-width: 420px;

  margin-left: 0;

    font-size: 14px;
    line-height: 1.55;

    color: #000000;

    transition: opacity 0.25s ease;
}


/* ==========================================
   CONTENT CHANGE ANIMATION
========================================== */

.evolution-right.is-changing .display-year,
.evolution-right.is-changing .percentage,
.evolution-right.is-changing .stats-description {
    opacity: 0;
}

.evolution-right.is-changing .percentage {
    transform: translateY(10px);
}





/* ==========================================
   TABLET
========================================== */

@media (max-width: 1100px) {

    .evolution-section {
        padding: 70px 30px;
    }

    .evolution-container {
        grid-template-columns: 1fr 1fr;
    }

    .evolution-left {
        grid-column: 1 / -1;

        padding-right: 0;
        margin-bottom: 45px;
    }

    .evolution-intro {
        margin-bottom: 45px;
    }

    .timeline-navigation {
        margin-top: 0;
    }

    .evolution-image-wrapper,
    .evolution-right {
        height: 400px;
    }
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 700px) {

    .evolution-section {
        padding: 50px 20px;
    }

    .evolution-container {
        display: block;
    }

    .evolution-left {
        margin-bottom: 30px;
    }

    .evolution-title {
        font-size: 34px;
    }

    .evolution-intro {
        font-size: 13px;
        margin-bottom: 35px;
    }

    .timeline-navigation {
        width: 100%;
        gap: 10px;
        overflow: hidden;
    }

    .timeline-years {
        flex: 1;

        justify-content: flex-start;

        gap: 16px;

        overflow-x: auto;

        scrollbar-width: none;
    }

    .timeline-years::-webkit-scrollbar {
        display: none;
    }

    .year-btn {
        flex-shrink: 0;
    }

    .year-btn.active {
        font-size: 24px;
    }

    .evolution-image-wrapper {
        height: 350px;
    }

    .evolution-right {
        height: auto;
        min-height: 280px;

        padding: 30px;
    }

    .display-year {
        margin-bottom: 100px;
    }
}

/* ==========================================
   EVOLUTION TIMELINE — ANIMATION ADDITIONS

   Append this to your existing
   evolutionTimelineSection.css.

   Replace the two rules marked REPLACE.
   Everything else is new.

   FAIL-SAFE: nothing here hides content
   unless the JS has run and added
   .reveal-ready, so a broken or missing
   script leaves the section fully visible.
========================================== */


/* ==========================================
   REPLACE your .evolution-image rule
========================================== */

.evolution-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    opacity: 1;
    transform: scale(1) translateX(0);

    transition:
        opacity .35s ease,
        transform .55s cubic-bezier(.22, .61, .36, 1);
}

/* slide in from the right when moving forward */
.evolution-image-wrapper.from-right .evolution-image.is-changing {
    opacity: 0;
    transform: scale(1.04) translateX(40px);
}

/* slide in from the left when moving back */
.evolution-image-wrapper.from-left .evolution-image.is-changing {
    opacity: 0;
    transform: scale(1.04) translateX(-40px);
}

/* fallback when no direction class is set */
.evolution-image.is-changing {
    opacity: 0;
    transform: scale(1.04);
}

.evolution-image-wrapper:hover .evolution-image {
    transform: scale(1.05);
}


/* ==========================================
   REPLACE your content-change rule
   (staggered fade for the three lines)
========================================== */

.evolution-right .display-year,
.evolution-right .percentage,
.evolution-right .stats-description {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity .4s ease,
        transform .5s cubic-bezier(.22, .61, .36, 1);
}

.evolution-right .display-year      { transition-delay: .05s; }
.evolution-right .percentage        { transition-delay: .12s; }
.evolution-right .stats-description { transition-delay: .19s; }

.evolution-right.is-changing .display-year,
.evolution-right.is-changing .percentage,
.evolution-right.is-changing .stats-description {
    opacity: 0;
    transform: translateY(14px);
    transition-delay: 0s;
}


/* ==========================================
   NEW — progress bar under the active year
========================================== */

.year-btn.active::before {
    content: "";

    position: absolute;
    left: 0;
    bottom: -18px;

    width: 100%;
    height: 2px;

    background: rgba(255, 103, 29, .25);

    transform: scaleX(0);
    transform-origin: left center;
}

.evolution-section.is-playing .year-btn.active::before {
    animation: evo-progress 4s linear forwards;
}

@keyframes evo-progress {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}


/* ==========================================
   NEW — arrow feedback
========================================== */

.timeline-arrow {
    transition:
        background .3s ease,
        color .3s ease,
        transform .3s ease;
}

.timeline-arrow:hover {
    transform: scale(1.12);
}

.timeline-arrow:active {
    transform: scale(.94);
}

.year-btn:not(.active):hover {
    transform: translateY(-2px);
}


/* ==========================================
   NEW — scroll reveal

   IMPORTANT: the hiding only applies once
   JS adds .reveal-ready to the section.
   Without JS the content stays visible.
========================================== */

.evolution-section.reveal-ready .evolution-left,
.evolution-section.reveal-ready .evolution-image-wrapper,
.evolution-section.reveal-ready .evolution-right {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity .7s ease,
        transform .8s cubic-bezier(.22, .61, .36, 1);
}

.evolution-section.reveal-ready.is-revealed .evolution-left {
    opacity: 1;
    transform: none;
    transition-delay: .05s;
}

.evolution-section.reveal-ready.is-revealed .evolution-image-wrapper {
    opacity: 1;
    transform: none;
    transition-delay: .18s;
}

.evolution-section.reveal-ready.is-revealed .evolution-right {
    opacity: 1;
    transform: none;
    transition-delay: .30s;
}


/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .evolution-image,
    .evolution-right .display-year,
    .evolution-right .percentage,
    .evolution-right .stats-description,
    .evolution-section .evolution-left,
    .evolution-section .evolution-image-wrapper,
    .evolution-section .evolution-right,
    .timeline-arrow,
    .year-btn {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .evolution-section.is-playing .year-btn.active::before {
        animation: none;
    }
}